package com.gxa.zhonglong.service;

import com.gxa.zhonglong.exception.BusinessException;
import com.gxa.zhonglong.pojo.User;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 *
 * @author : 宸濯
 * Date: 2021/10/26 19:57
 * Description:
 * Version: V1.0
 */
public interface UserService {

    List<Map<String,Object>> selectByName(String name) throws BusinessException;
    List<Map<String,Object>> selectByPage(Integer page,Integer size,String name) throws BusinessException;
    Integer selectCount(String name);
    void add(User user) throws BusinessException;
    void update(User user) throws BusinessException;
    void del(List<Long> ids) throws BusinessException;

    /**
     * 用户登录的方法
     * @param userName 用户名
     * @param password 用户密码
     * @return 用户的权限列表
     * @throws BusinessException
     */
    Map<String,Object> login(String userName, String password) throws BusinessException;

}
